<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo('charset'); ?>" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<meta name="viewport" content="width=device-width, initial-scale=1"/>
	<meta name="description" content="GGE Cares | We care about your future | american pronunciation| tutoring | toeic | toefl | ielts | visa services | guardianship | vietnamese for foreigner">
	<meta name="keywords" content="american pronunciation, tutoring, toeic, toefl, ielts, visa services, guardianship, vietnamese for foreigner">
	<title><?php wp_title( '|', true, 'right' ); ?><?php echo get_bloginfo('name'); ?></title>
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <script>
    	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    	})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
    	ga('create', 'UA-48792279-1', 'ggecares.com');
    	ga('send', 'pageview');
    </script>
    <!--[if lt IE 9]>
    <script src="<?php echo assets('js/html5.js'); ?>" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
</head>

<body>
	<div class="container" id="wrap">
		<div class="row">
			<div id="logo" class="col-md-8 col-sm-6 col-xs-6 mgt10">
				<a href="<?php echo url_by_lang(get_home_url(), false); ?>" title="<?php echo get_bloginfo('name'); ?>">
					<img width="150px" src="<?php echo assets('images/logo.jpg'); ?>" alt="<?php echo get_bloginfo('name'); ?>" />
				</a>
			</div><!-- end #logo -->
			<div id="top-contact" class="col-md-4 col-sm-6 col-xs-6 mgt10">
				<address class="clear-mar">
					<span class='add-company'>
                        <strong>GGE Cares.</strong>
                    </span>
					<span>
                        <abbr title="Phone">
                            <?php echo _trans('title.call_us_at'); ?>: (08) 3715 3864
                        </abbr>
                    </span>
					<span>
                        <abbr title="Email"><?php echo _trans('title.email_us_at'); ?>:
                            <a href="mailto:ggecares@gmail.com">ggecares@gmail.com</a>
                        </abbr>
                    </span>
                    <span>
                        <?php echo _trans('title.free_placement_test'); ?>
                    </span>
				</address>
				<ul id="lang-sw">
					<li><a class="vi" href="<?php echo url_lang(NULL, 'vi'); ?>" title="Việt Nam">VI</a></li>
                    <li><a class="en" href="<?php echo url_lang(); ?>" title="English">EN</a></li>
				</ul>
			</div><!--end  #contact -->
			<div class="clearfix"></div>
		</div><!--end top .logo .contact -->

		<?php
		global $post;
		$aExPages = array('contact-us', 'employment', 'apply-for-a-course', 'exam-preparation');
		$page_ids = '';
		foreach ($aExPages as $key => $value) {
			$page = get_page_by_path($value);
			$page_ids .= $page->ID . ',';
		}
		$pargs = array(
			'title_li'=>'',
			'exclude' => substr($page_ids, 0, -1),
			'echo' => 0,
			'sort_column' => 'menu_order'
			);
		$aPages = get_pages($pargs);
		?>
		<nav class="navbar navbar-default" role="navigation">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand visible-xs" href="<?php echo get_home_url();?>">Home</a>
			</div>

			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav" id="top-menu">
					<?php
                        $isEn = is_en();
                        foreach ($aPages as $p) {
        					$activeClass = '';
        					if($p->ID == $post->ID){
        						$activeClass = 'active';
        					}
                            $page_title = '';
                            if(!$isEn){
                                $page_meta = get_post_custom($p->ID);
                                if(isset($page_meta['page_title_vi'][0])){
                                    $page_title = $page_meta['page_title_vi'][0];
                                } else {
                                    $page_title = get_the_title($p->ID);
                                }
                            } else {
                                $page_title = get_the_title($p->ID);
                            }
                    ?>
					<li class="<?php echo $activeClass; ?>">
						<a href="<?php echo url_by_lang($p->ID); ?>"><?php echo $page_title; ?></a>
					</li>
					<?php } ?>
				</ul>
			</div>
		</nav>

		<div class="row">
			<div class="col-md-7 col-xs-12 col-sm-7">
				<div id="banner-slide">
					<ul class="bjqs">
						<li><img src="<?php echo assets('images/slide/visa-services.jpg'); ?>" alt="Visa Services" title="Visa Services"/></li>
						<li><img src="<?php echo assets('images/slide/business-training.jpg'); ?>" alt="Business Training" title="Business Training"/></li>
						<li><img src="<?php echo assets('images/slide/ielts.jpg'); ?>" alt="IELTS" title="IELTS"/></li>
						<li><img src="<?php echo assets('images/slide/toefl.jpg'); ?>" alt="TOEFL" title="TOEFL"/></li>
						<li><img src="<?php echo assets('images/slide/toeic.jpg'); ?>" alt="TOEIC" title="TOEIC"/></li>
					</ul>
				</div>
			</div><!--end #banner-slide -->
			<div class="col-md-5 col-xs-12 col-sm-5 mgt10" id="top-english-course">
				<ul>
					<?php
					$args = array('post_type'=>'english-course', 'order'=>'ASC');
					query_posts( $args );
					while ( have_posts() ) : the_post();
					?>
					<li>
						<?php
						$post_meta = get_post_meta(get_the_ID());
						$pTitle = $isEn==true ? get_the_title():$post_meta['ec_title_vi'][0];
						?>
						<a href="<?php the_permalink(); ?>" title="<?php echo $pTitle; ?>"><?php echo $pTitle; ?></a>
					</li>
					<?php
					endwhile;
					wp_reset_query();
					?>
				</ul>
			</div><!-- end #top-english-course -->
			<div class="clearfix"></div>
		</div><!--end #banner-slide-top-english-course -->

		<div class="row mgt15">
			<div id="content" class="col-md-9 col-sm-8 col-xs-12 col-md-push-3">